package com.example.week1.mvp.presenter;


import android.util.Log;
import android.widget.Toast;

import com.example.mylibrary.mvp.presenter.BasePresenter;
import com.example.mylibrary.okhttp.MyCallBack;
import com.example.week1.mvp.contrat.RegisterContrat;

public class RegisterPresenter extends BasePresenter<RegisterContrat.RegisterModel, RegisterContrat.RegisterView> {
    public RegisterPresenter(RegisterContrat.RegisterModel mModel, RegisterContrat.RegisterView mView) {
        super(mModel, mView);
    }
    public void register(){
        mView.goLogin();
        mModel.register(mView.getUsername(), mView.getpwd(), mView.getrepwd(), new MyCallBack() {
            @Override
            public void OnOk(String str) {
                mView.goLogin();

            }
            @Override
            public void OnNo(String message) {

            }
        });
    }
}
